{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load textfilters %}
{% block title %}Writeups for {{ doc.name }}-{{ doc.rev }}{% endblock %}
{% block content %}
    {% origin %}
    {{ top|safe }}
    {% for title, subtitle, writeups in sections %}
        <h2 class="my-3">
            {{ title|capfirst_allcaps }}
            {% if subtitle %}
                <br>
                <small class="text-body-secondary">{{ subtitle|safe }}</small>
            {% endif %}
        </h2>
        {% for name, text, url in writeups %}
            {% if name %}<h3 class="mt-5">{{ name }}</h3>{% endif %}
            {% if text %}<pre class="border p-3 my-3">{{ text|urlize_ietf_docs|linkify }}</pre>{% endif %}
            {% if can_edit %}
                <p>
                    <a href="{{ url }}" class="btn btn-primary">
                        {% if text %}
                            Edit
                        {% else %}
                            Generate
                        {% endif %}
                        {{ name|lower_allcaps }}
                    </a>
                </p>
            {% endif %}
        {% endfor %}
    {% endfor %}
{% endblock %}
